package server;

import java.io.IOException;
import java.net.InetSocketAddress;

import org.apache.mina.core.service.IoAcceptor;
import org.apache.mina.filter.logging.LoggingFilter;
import org.apache.mina.transport.socket.nio.NioSocketAcceptor;

public class SimpleTestServer {

	private static int SERVER_PORT = 10001;
	
	/**
	 * @param args
	 */
	public static void main(String[] args) throws IOException {
		IoAcceptor acceptor = new NioSocketAcceptor();
		acceptor.getFilterChain().addLast("logger", new LoggingFilter());
		//:TODO acceptor.getFilterChain().addLast("coddec", new PojoCodec());
		acceptor.setHandler(new RequestHandler());
		acceptor.bind(new InetSocketAddress(SERVER_PORT));
		System.out.println("Simple Test Server started on port: " + SERVER_PORT);
	}

}
